package com.woniuxy.producer;

import com.woniuxy.util.RabbitmqConst;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @author ：CuiYC
 * @description：
 * @date ：Created in 2025/3/20 17:15
 * @modified By：
 */
@Component
public class TopicProducer {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(String msg, String routingKey) {
       rabbitTemplate.convertAndSend(RabbitmqConst.TOPIC_EXCHANGE, routingKey, msg);
    }
}
